﻿using System;
using System.Collections.Generic;
using System.Linq;

namespace PeiYue.Model.Models.SM
{
    /// <summary>
    /// 销售单头档
    /// </summary>
    [SqlSugar.SugarTable("oms_sm_so_header")]
    public class SoHeaderDao : BaseDao
    {
        /// <summary>
        /// 机构id
        /// </summary>
        public long unit_id { get; set; }
        /// <summary>
        /// 订单类型 1:正常订单,2:补货订单,3:售后补货订单
        /// </summary>
        public int types { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int modes { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int kinds { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string codes { get; set; }
        /// <summary>
        /// 销售订单号
        /// </summary>
        public string codec { get; set; }
        /// <summary>
        /// 仓库id
        /// </summary>
        public long wh_id { get; set; }
        /// <summary>
        /// 客户id
        /// </summary>
        public long customer_id { get; set; }
        /// <summary>
        /// 门店id
        /// </summary>
        public long shop_id { get; set; }
        /// <summary>
        /// 下单时间，此处应为字符型
        /// </summary>kai 
        public string order_time { get; set; }
        /// <summary>
        /// 支付类型 0:账期,1:线上支付,2:线下付款
        /// </summary>
        public int payment_type { get; set; }
        /// <summary>
        /// 开票类型
        /// </summary>
        public int invoice_types { get; set; }
        /// <summary>
        /// 单品需求数量
        /// </summary>
        public int item_need_qty { get; set; }
        /// <summary>
        /// 单品实际数量
        /// </summary>
        public int item_real_qty { get; set; }
        /// <summary>
        /// 单件需求数量
        /// </summary>
        public int unit_need_qty { get; set; }
        /// <summary>
        /// 单件实际数量
        /// </summary>
        public int unit_real_qty { get; set; }
        /// <summary>
        /// 作业状态
        /// </summary>
        public int handle { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int cancel { get; set; }
        public int do_qty { get; set; }
        public int vl_qty { get; set; }
        /// <summary>
        /// 应付金额
        /// </summary>
        public int need_amt { get; set; }
        /// <summary>
        /// 实付金额
        /// </summary>
        public int real_amt { get; set; }
        /// <summary>
        /// 折扣金额（部分订单抹个零头）
        /// </summary>
        public int discount_amt { get; set; }
        /// <summary>
        /// 支付时间
        /// </summary>
        public string pay_time { get; set; }
        /// <summary>
        /// 支付状态
        /// </summary>
        public int pay_status { get; set; }
        /// <summary>
        /// 采购状态
        /// </summary>
        public int pm_status { get; set; }
        /// <summary>
        /// 期望到货日期
        /// </summary>
        public string expect_date { get; set; }
        /// <summary>
        /// 期望到货时间
        /// </summary>
        public string expect_time { get; set; }
        public string feedback { get; set; }
        /// <summary>
        /// 订单备注
        /// </summary>
        public string remark { get; set; }
        /// <summary>
        /// 审核备注
        /// </summary>
        public string audit_remark { get; set; }
        /// <summary>
        /// 加工数量
        /// </summary>
        public int mo_qty { get; set; }
        /// <summary>
        /// 加工金额
        /// </summary>
        public int mo_amt { get; set; }
        /// <summary>
        ///发货时间
        /// </summary>
        public DateTime? deliver_time { get; set; }
        /// <summary>
        /// 原来订单id
        /// </summary>
        public long source_so_id { get; set; }
    }
}
